package com.ghpt.service.impl;
import com.ghpt.mapper.CoalEmissionMapper;
import com.ghpt.pojo.CoalEmission;
import com.ghpt.service.CoalEmissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CoalEmissionServiceImpl implements CoalEmissionService {
    @Autowired
    private CoalEmissionMapper coalEmissionMapper;

    @Override
    public CoalEmission findCoalEmissionById(Long id) {
        if (id != null) {
            return coalEmissionMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(CoalEmission coalEmission) {
        return coalEmissionMapper.updateById(coalEmission);//更新成功为1否则为0
    }
}
